package com.better.common.base;

import com.better.common.jwtauth.secruity.JWTUserDetails;
import com.better.common.utils.SessionUtils;
import org.springframework.web.bind.annotation.RestController;
/**
 * 基类
*@author:
*@date :2018/1/26
*/
@RestController
public class BaseController {
	public JWTUserDetails getUser() {
		return  SessionUtils.getUserInfo();
	}

	public String getUserId() {
		return getUser().getId();
	}

	public String getUsername() {
		return getUser().getUsername();
	}
}